package com.itheima.es.controller;

import com.itheima.es.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
public class GoodsController {
    @Autowired
    GoodsService goodsService;

    @GetMapping("addAll")
    public String addAll() throws IOException {
         goodsService.addAll();
         return "已添加进ES索引库中";
    }
}
